<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'closeWindowEvent.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
<script language="javascript"> 
var MSG_UNLOAD="如果你此时离开档案系统，所做操作信息将全部丢失，是否离开?"; 

var UnloadConfirm = {}; 

/* //启用监听浏览器刷新、关闭的方法 
UnloadConfirm.set = function(confirm_msg){ 
    window.onbeforeunload = function(event){ 
        event = event || window.event; 
        event.returnValue = confirm_msg; 
    }; 
} ;

//关闭监听浏览器刷新、关闭的方法 

UnloadConfirm.clear = function(){ 
    window.onbeforeunload = function(){}; 
} ;
UnloadConfirm.set(MSG_UNLOAD);  */
window.onbeforeunload=function(event){
        return 'hello';
    };




</script> 
  </head>
  
  <body>
    This is my JSP page. <br>
  </body>
</html>
